home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 050 / tpstuff1.arc / GDEMO.PAS < prev    next >
Encoding:
Pascal/Delphi Source File  |  1985-04-21  |  1.0 KB  |  48 lines

  1. PROGRAM graphtest(input,output);
  2.  
  3. {$I graphics.lib}
  4.  
  5. var
  6.    i,j : integer;
  7.    ch : char;
  8.  
  9. procedure doboxes;
  10. var
  11.    x1,y1,x2,y2,x : integer;
  12. begin
  13.    for x := 1 to 20 do begin
  14.       x1 := random(500);
  15.       y1 := random(150);
  16.       x2 := random(630);
  17.       y2 := random(220);
  18.       drawbox(x1,y1,x2,y2,white);
  19.    end;
  20. end;
  21.  
  22. BEGIN { bitmap }
  23.    graphon;
  24.  
  25.    write(chr(27),'x1');
  26.  
  27.    drawline(50,100,100,200,white);
  28.    drawline(50,200,100,100,white);
  29.  
  30.    drawbox(50,100,100,200,white);
  31.    for i := 1 to 49 do drawbox(50+i,100+i,100-i,200-i,white);
  32.  
  33.    drawcircle(400,100,100,white,1.0);
  34.    for i := 1 to 50 do drawcircle(random(640),random(224),random(100),random(6)+1,1.0);
  35.  
  36.    GotoXY(60,2);
  37.    write('Done   ');
  38.    read(kbd,ch);
  39.    clrscr;
  40.    randomize;
  41.    doboxes;
  42.    gotoxy(60,2);
  43.    write('Done   ');
  44.    read(kbd,ch);
  45.    graphoff;
  46.    write(chr(27),'y1');
  47. END.
  48.